﻿@using Utils;
@model WebUI.Models.IndSavedJobViewModel
@{
    ViewBag.Title = Model.Ind.FullName + " - JuicyBasket";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="mainCol">
    <div class="profile">
        <div class="fl">
            <a href="@Url.Action("Shots", new { UserName = Model.Login.UserName })" title="@Model.Ind.FullName">
                <img class="avatar80" src="@Url.StaticFile(Model.AvatarUrl)" alt="@Model.Ind.FullName"/>
            </a>
        </div>
        <div class="fl">
            <h1>
                <span>@Model.Ind.FullName</span>
            </h1>
            <div class="profile-title">
                <span>@Model.Ind.Title</span>
            </div>
            <div class="profile-detail">
                <div class="fl">
                    <a href="@Url.Action("Designers", "Search", new { location = Model.Ind.Location })" class="locality">@Model.Ind.Location</a>
                </div>
                @if (!string.IsNullOrEmpty(Model.Ind.PersonalUrl.ToDomainName()))
                {
                <div class="fl">
                    <a href="@Model.Ind.PersonalUrl" class="url" target="_blank">@Model.Ind.PersonalUrl.ToDomainName()</a>
                </div>
                }
                @if (!string.IsNullOrEmpty(Model.Ind.Twitter))
                {
                <div class="fl">
                    <a href="http://twitter.com/@Model.Ind.Twitter" class="twitter" target="_blank">@Model.Ind.Twitter</a>
                </div>
                }
            </div>
            
            <div class="clear"></div>
        </div>
    </div>
    <ul class="tabs">
        <li>
            <a href="@Url.Action("Shots", new { UserName = Model.Login.UserName})">Shots<span class="count">@Model.Ind.ShotCount</span></a>
        </li>
        <li>
            <a href="@Url.Action("Resume", new { UserName = Model.Login.UserName })">Resume</a>
        </li>
        <li>
            <a href="@Url.Action("Tags", new { UserName = Model.Login.UserName})">Tags<span class="count">@Model.Ind.ShotTagCount</span></a>
        </li>
        <li>
            <a href="@Url.Action("SavedTalent")">Saved Talent</a>
        </li>
        <li class="active">
            <a href="@Url.Action("SavedJobs")">Saved Jobs</a>
        </li>
    </ul>
    <div class="tabsbottom"></div>
    <div class="clear"></div>
    @if (Model.CoJobList.Count > 0)
    {
    <ol class="player-cards">
        @for (int i = 0; i < Model.CoJobList.Count; i++)
        {
            var coJob = Model.CoJobList[i];
            <li>
                <div class="job-info">
                    <div class="fl">
                        @if (coJob.Job.Status == 1)
                        {
                        <a href="/jobs/@coJob.Job.JobID/@CommonUtilities.GetTitleInUrl(coJob.Job.Title)">
                            <img class="avatar80" src="@Url.StaticFile(coJob.Co["AvatarUrl"])" alt="@coJob.Co.Name"/>
                        </a>
                        }
                        else
                        {
                        <a href="/company/detail/@coJob.Co.CoID">
                            <img class="avatar80" src="@Url.StaticFile(coJob.Co["AvatarUrl"])" alt="@coJob.Co.Name"/>
                        </a>
                        }
                    </div>
                    <div class="vsmallspacer"></div>
                    <div class="fl">
                        <h1>
                            @if (coJob.Job.Status == 1)
                            {
                            <a href="/jobs/@coJob.Job.JobID/@CommonUtilities.GetTitleInUrl(coJob.Job.Title)">@coJob.Job.Title.ToUpperAllFirstLetter()</a>
                            }
                            else
                            {
                            @coJob.Job.Title.ToUpperAllFirstLetter()
                            }
                        </h1>
                        <div class="profile-title">
                            <span>@coJob.Job.Location - @coJob.Job.CreateDate.ToDateTimeString()</span>
                        </div>
                        <div class="profile-detail">
                            <div class="fl">
                                <a href="@coJob.Co.CoUrl">@coJob.Co.Name</a>
                            </div>
                        </div>
            
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="action">
                    <div class="smallspacer"></div>
                    <div class="saved-info">Saved</div>
                    <div class="saved-info">@coJob.Job.SavedDate.ToDateTimeString()</div>
                    <div class="smallspacer"></div>
                    <div class="unsave"><a href="/job/unsave?jobid=@coJob.Job.JobID" rel="unsave">Unsave</a></div>
                </div>
                <div class="clear"></div>
            </li>
        }
    </ol>
    <div class="clear"></div>
    <div class="page">
        <div class="paging">
        @if (Model.PreviousPage > 0)
        {
            <a href="@Url.Action("savedjobs", new { Page = Model.PreviousPage })" class="action pagingaction" rel="prev">← Newer</a>
        }
        @if (Model.NextPage > 0)
        {
            <a href="@Url.Action("savedjobs", new { Page = Model.NextPage })" class="action pagingaction" rel="next">Older →</a>
        }
        </div>
    </div>
    }
    else
    { 
    <div class="null-message">
	    <h2>None</h2>
    </div>
    }
    <div class="clear"></div>
</div>
<div class="sideCol">
    <div class="profile">
        <div class="clear"></div>
        <div class="smallspacer"></div>
        <div>
            <a class="action editaccount" href="/ind/editprofile">
                <span>Edit Account</span>
            </a>
            <a class="action uploadshot" href="/ind/uploadshot">
                <span>Uploat Shot</span>
            </a>
        </div>
    </div>
    <div class="clear"></div>
    @*@if (!string.IsNullOrEmpty(Model.Ind.Bio))
    {
        <ul class="tabs">
            <li>
                <h3>About<span>&nbsp;@Model.Ind.FullName</span></h3>
            </li>
        </ul>
        <div class="tabsbottom"></div>
        <div><p class="text">@Model.Ind.Bio</p></div>
        <div class="clear"></div>
    }
    
    @if (Model.SkillList.Count > 0)
    {
        <ul class="tabs">
            <li>
                <h3>Skills</h3>
            </li>
        </ul>
        <div class="tabsbottom"></div>
        <ol class="tags">
            @foreach (var skill in Model.SkillList)
            {
                <li><a href="@Url.Action("Designers", "Search", new { Skills = skill.Name})">@skill.Name</a></li>
            }
        
        </ol>
        <div class="clear"></div>
    }*@
    
</div>

@section FooterContent
{
    <script type="text/javascript" src="@Url.StaticFile("~/content/jquery.form.js")"></script>
    <script type="text/javascript" src="@Url.StaticFile("~/content/jquery.tipsy.js")"></script>
    <script type="text/javascript" src="@Url.StaticFile("~/content/shots.js")"></script>
}